package com.sjb.mianshiya.contant;

/**
 * @Author:sjb
 * @CreateTime:2024-11-14
 * @Description: Redis Key 常量
 * @Version：1.0
 */
public interface RedisConstant {

    /**
     * 用户签到的Redis的key前缀
     */
    String USER_SIGN_IN_REDIS_KEY_PREFIX = "user:signins";

    /**
     * 获取签到key
     * @param year
     * @param userId
     * @return
     */
    static String getUserSignInRedisKeyPrefix(int year,Long userId){
        return String.format("%s:%s:%s", USER_SIGN_IN_REDIS_KEY_PREFIX, year,+userId);
    }
}
